﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Gollie.Administration.Service.Tasks.InvoiceHelpers
{
	public abstract class InvoiceDetail
	{
		public decimal Amount;

		public string this[int index]
		{
			get
			{
				string retVal = "";

				switch (index)
				{
					case 1: retVal = Column1(); break;
					case 2: retVal = Column2(); break;
					case 3: retVal = Column3(); break;
					case 4: retVal = Column4(); break;
				}

				return retVal;
			}

		}

		public string[] Values
		{
			get
			{
				return new string[] { this[1], this[2], this[3], this[4] };
			}
		}

		public virtual string Column1()
		{
			return "";
		}

		public virtual string Column2()
		{
			return "";
		}

		public virtual string Column3()
		{
			return "";
		}

		public virtual string Column4()
		{
			return Bedrag();
		}

		private string Bedrag()
		{
			return Amount.ToString("c2");
		}
	}
}
